package cn.rxls.community.controller;


import cn.rxls.community.dto.resourceUsage.ResourceUsagePageDTO;
import cn.rxls.community.result.Result;
import cn.rxls.community.vo.resourceUsage.ResourceUsageVO;
import cn.rxls.community.service.ResourceUsageService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;


/**
 * 资源使用(ResourceUsage)表
 *
 */
@RestController
@RequestMapping("resource")
public class ResourceUsageController {
    /**
     * 服务对象
     */
    @Resource
    private ResourceUsageService resourceUsageService;

    /**
     * 根据房屋id分页查询所有数据
     *
     * @param dto 分页对象
     * @return 所有数据
     */
    @GetMapping("/page/house")
    public Result<List<ResourceUsageVO>> selectPageAllByHouseId(@ModelAttribute @Valid ResourceUsagePageDTO dto) {
        return Result.success(resourceUsageService.selectPageResourceUsageByHouseId(dto));
    }

}

